const { contextBridge, ipcRenderer } = require("electron");

contextBridge.exposeInMainWorld("electronAPI", {
  getNewImage: () => ipcRenderer.invoke("getNewImage"),
  onUpdate: (callback) =>
    ipcRenderer.on("update", (_event, value) => callback(value)),
});
